home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c
- Subject: Re: I need help with a compiler
- Date: 3 Jan 1996 22:30:18 GMT
- Organization: Kalevi, Inc
- Message-ID: <4cf01q$3fp@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe6.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Jan 02, 1996 14:25:14 in article <I need help with a compiler>,
- 'loople@gcomm.com (Mike Lopier)' wrote:
-
- >
- >I am trying to *learn* C so i bought 2 books, 1 for learning C and
- >another to move from C to C++, one of them came with a compiler called
- >GNU but I write a simple program like:
- >
- >#include <iostream.h>
- >main ()
- >{
- >cout "Hello";
- >}
-
- This is a C newsgroup. <iostream.h> and cout are C++ stuff. Which are
- you tryig to learn? If it's C, do this:
- #include <stdio.h>
- int main ()
- {
- printf("Hello, World!\n");
- return 0;
- }
-
- If C++, then try:
-
- #include <iostream.h>
- int main ()
- {
- cout << "Hello\n";
- return 0;
- }
-
- >And when i tried to compile it I get a Iostream.h -- file not found
- >
- >Well i've copied the .cpp, the iostream.h, and teh compiler all into the
- >same directory and it still gave me that error. I've even put it in the
- >path but still it keeps saying 'file not found'...There are no options
- >for 'path of header files' or something...it is a command line
- >compiler..So i am thouroughly confused and frustrated. If anyone out
- >there knows why even though i know that i didn't give you enough info
- >that's all i can come up with and I have no idea why it won't work.
-
- Right, not enough info. What platform? I assume DOS -- if not,
- disregard.
-
- The GNU compiler may be gcc or one of its relatives. If so,
- you can use the -I option to specify paths; e.g., something like:
-
- gcc -IC:\GNU\INCLUDE
-
- Some older versions of gnu gcc copiler also did not like file
- extension .cpp. Try changing it to .c or .cc
- --
-
- Pete
-
-
-
-
-
-